package cn.iocoder.yudao.module.pm.dal.mysql.cooked;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.pm.dal.dataobject.cooked.CookedDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.pm.controller.admin.cooked.vo.*;

/**
 * 熟食成品管理 Mapper
 *
 * @author admin
 */
@Mapper
public interface CookedMapper extends BaseMapperX<CookedDO> {

    default PageResult<CookedDO> selectPage(CookedPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CookedDO>()
                .likeIfPresent(CookedDO::getMealName, reqVO.getMealName())
                .eqIfPresent(CookedDO::getStatus, reqVO.getStatus())
                .orderByDesc(CookedDO::getId));
    }

}